from knowledge import Date


from knowledge import Person
from knowledge import Location
from knowledge import Group
from knowledge import Object
from knowledge import Event

from knowledge import Page

def getPage():
   trevor = Person(name="trevor" , birth=Date(year=1988))
   peter = Person(name="peter", birth=Date(year=1987))
   daniel = Person(name="daniel", birth=Date(year=1986))
   gregory = Person(name="gregory", birth=Date(year=1985))
   georg = Person(name="georg", birth=Date(year=1984))
   ca = Location(name="california")
   group = Group(name="our group", members=set((
      trevor, peter, daniel, gregory, georg)))
   proj = Object(name="this project", creation=
      Date(year=2010, month=3, day=19), 
         creator=group)
   ucsc = Location(name="ucsc", events= (proj), within=(ca))
   proj.location = (ucsc)
   ca.contains.add(ucsc)

   govna = Person(name="ahnold", birth=Date(year=1950), caused=(ca),
         pronoun="he")
   prof = Person(name="prof walker", birth=Date(year=1950), 
      pronoun="she")
   ai = Event(name="ai class", start=Date(year=2010, month=1, day=1), 
      end=Date(year=2010,month=3,day=15),
         where=ucsc, participants=set((trevor, peter, daniel, gregory,
            georg, prof)))
   prof.particpated = (ai)


   factxs = [trevor, peter, daniel, gregory, georg, ca, group, proj,
         ucsc, govna, prof, ai]
   page = Page(url="dummyPage", facts=factxs)
   for fact in factxs:
      fact.page = page
#      print repr(fact)
#   print "fake fact list ", factxs
   return page

